package org.dx.oho.book.one.proxy.jdk;
/**
 * create by duanx 2021/5/18
 *@description：
 *@classname: JdkProxyTest
 *@author: duanx
 *@date: 2021/5/18 22:49
 **/
public class JdkProxyTest {

    public static void testJdkProxyExample(){
        //代理对象
        JdkProxyExample jdkProxyExample = new JdkProxyExample();
        //建立真实对象和代理对象的联系
        HelloWorld helloWorld = (HelloWorld) jdkProxyExample.bind(new HelloWorldImpl());
        //调用方法
        helloWorld.sayHello("段旭");
    }


    public static void main(String[] args) {
        testJdkProxyExample();
    }

}
